package com.lc.service.impl;

import com.lc.bean.Student;
import com.lc.dao.StudentDao;
import com.lc.dao.impl.StudentDaoImpl;
import com.lc.service.StudentService;

import java.util.List;

/**
 * @description:
 * @author: ManolinCoder
 * @time: 2021/8/22
 */
public class StudentServiceImpl implements StudentService {
    private StudentDao studentDao = new StudentDaoImpl();
    @Override
    public List<Student> getStudents(String name,String stuno,int sex,int pageIndex,int pageSize) {
        return studentDao.getStudents(name,stuno,sex,pageIndex,pageSize);
    }

    @Override
    public int total(String name, String stuno, int sex) {
        return studentDao.total(name,stuno,sex);
    }

    @Override
    public int insertStu(Student student) {
        return studentDao.insertStu(student);
    }

    @Override
    public Student findById(int sid) {
        return studentDao.findById(sid);
    }

    @Override
    public int updateStu(Student student) {
        return studentDao.updateStu(student);
    }

    @Override
    public int delStu(String sid) {
        return studentDao.delStu(sid);
    }
}
